package com.wujiansima.renyisima.demo;

import java.io.File;

public class Demo2 {
    public static void main(String[] args) {
        File f = new File("C:\\Users\\任意的爹\\Desktop\\wew");
        deleteFile(f);
    }

    private static void deleteFile(File f) {
        File[] files = f.listFiles();
        for (File file : files) {
            if (file.isFile()){
                file.delete();
            }else{
                deleteFile(file);
            }
        }
        f.delete();
    }
}
